package com.example.demo.entity.thread;


import com.example.demo.entity.thread.HelloThread;

public class MyThread extends Thread{
    public volatile boolean running = true;
    @Override
    public void run() {
        System.out.println("my线程启动。。。");
        HelloThread helloThread = new HelloThread();
        helloThread.start();
        try {
            helloThread.join();
        } catch (InterruptedException e) {
            System.out.println("my线程收到中断信号。。。");
        }
        helloThread.interrupt();
        System.out.println("my线程执行完毕。。。");
    }
}
